package com.kongmou.springBootBase.prefix;

import javax.annotation.Resource;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@RestController
@EnableWebMvc
public class PrefixApplication {
	
	@Resource
	private BookSetting bookSetting;
	
	@RequestMapping("/getBookInfo")
	public String getBookInfo(){
		return "book's name " + bookSetting.getName() + "\n book's reader :" + bookSetting.getReader();
	}
	
	public static void main(String[] args) {
		SpringApplication.run(PrefixApplication.class, args);
	}

}
